home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Text / Sources / RulerFrame.cpp < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.3 KB  |  81 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                            RulerFrame.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                        Anthone Burbidge
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef _TEXTPART_
  14. #include "TextPart.h"
  15. #endif
  16.  
  17. #ifndef _RULERFRAME_
  18. #include "RulerFrame.h"
  19. #endif
  20.  
  21. #ifndef _RULERFACET_
  22. #include "RulerFacet.h"
  23. #endif
  24.  
  25. #pragma segment TextPartSegment
  26.  
  27.  
  28. //========================================================================================
  29. // CLASS CRulerFrame
  30. //========================================================================================
  31.  
  32. //----------------------------------------------------------------------------------------
  33. // CRulerFrame::CRulerFrame
  34. //----------------------------------------------------------------------------------------
  35.  
  36. CRulerFrame::CRulerFrame() :
  37.     FW_CFrame(),
  38.     fTextPart(NULL)
  39. {
  40. }
  41.  
  42. //----------------------------------------------------------------------------------------
  43. // CRulerFrame::CRulerFrame
  44. //----------------------------------------------------------------------------------------
  45.  
  46. void CRulerFrame::IRulerFrame(XMPFrame* xmpFrame, CTextPart* textPart)
  47. {
  48.     InitFrame(xmpFrame, textPart);
  49.     SetFrontClicks(TRUE);
  50.     fTextPart = textPart;
  51. }
  52.  
  53. //----------------------------------------------------------------------------------------
  54. // CRulerFrame::~CRulerFrame
  55. //----------------------------------------------------------------------------------------
  56.  
  57. CRulerFrame::~CRulerFrame()
  58. {
  59. }
  60.  
  61. //----------------------------------------------------------------------------------------
  62. // CRulerFrame::FocusStateChanged
  63. //----------------------------------------------------------------------------------------
  64.  
  65. void CRulerFrame::FocusStateChanged(XMPTypeToken focus, FW_Boolean newState)
  66. {
  67.     FW_CFrame::FocusStateChanged(focus, newState);
  68. }
  69.  
  70. //----------------------------------------------------------------------------------------
  71. // CRulerFrame::NewFacet
  72. //----------------------------------------------------------------------------------------
  73.  
  74. FW_CFacet* CRulerFrame::NewFacet(XMPFacet* xmpFacet)
  75. {
  76.     CRulerFacet* facet = new CRulerFacet;
  77.     facet->IRulerFacet(xmpFacet, fTextPart);
  78.     return facet;
  79. }
  80.  
  81.